package com.totoro.mapper;

import com.totoro.pojo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author TOTORO
 * @date 2021/8/9 23:49
 */
@Repository
public interface ReturnMapper {

    List<PrimaryReturn> findUserReturnList(@Param("uid") int uid, @Param("type") int type, @Param("time") int time, @Param("status") int status,
                                           @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer addPrimaryReturn(PrimaryReturn primaryReturn);

    Integer updatePrimaryReturn(PrimaryReturn primaryReturn);

    Integer addPrimaryReturnImage(PrtImages prtImages);

    Integer deletePrimaryReturnAssignStatusImages(@Param("prId") int prId, @Param("status") int status);

    Integer deletePrimaryReturnOneStatusImages(@Param("prId") int prId, @Param("originalImageId") Integer[] originalImageId);

    List<PrtImages> findShallQuiltRemoveMultipleImage(@Param("prId") int prId, @Param("originalImageId") Integer[] originalImageId);

    Integer updatePrimaryReturnAssignStatusImageInstructionByImageId(@Param("piId") int piId, @Param("instruction") String instruction);

    Integer addPrimaryReturnAssignStatusInfo(ReturnStatusInfo returnStatusInfo);

    Integer addNegotiateHistory(NegotiateHistory negotiateHistory);

    Integer addNegotiateHistoryImage(NegotiateHistoryImages negotiateHistoryImages);

    PrimaryReturn findPrimaryReturnAllDetailByReturnOdd(@Param("returnOdd") String returnOdd);

    Integer updatePrimaryReturnStatusByReturnOdd(PrimaryReturn primaryReturn);

    Integer findOrderOddByPrimaryReturnId(@Param("primaryReturnId") int primaryReturnId);

    PrimaryReturn findPrimaryReturnByMarketSrId(@Param("msrId") int msrId);
}
